import '@/style/index.scss';
import { VueQueryPlugin } from '@tanstack/vue-query';
import 'uno.css';
import { createSSRApp } from 'vue';

import App from './App.vue';
import { prototypeInterceptor, requestInterceptor, routeInterceptor } from './interceptors';
import { setupI18n } from './locale/setupI18n';
import store from './store';

export function createApp() {
  const app = createSSRApp(App);
  app.use(store);
  setupI18n(app);
  app.use(routeInterceptor);
  app.use(requestInterceptor);
  app.use(prototypeInterceptor);
  app.use(VueQueryPlugin);

  return {
    app,
  };
}
